finished assignments. todo: cleanup, refactor.