ex1 finished, todo: comments, names, refactoring