cleaned up code during class