cleaned up and removed test prints
added arguments