get rid of useless code and printlns