cleaned up code!