remove print statements and move some methods