clean up code
tests for admin