removed print stmts and added tests