added test tests and cleaned up formatting