test cleaned up code