Any way to reduce print lines here?