added a test, cleaned up