nearly finished assignments, but still neats some testing and refactoring