added module 3 tests and refactored some stuff