moved print statements