added two homeworks and code refactoring