final commit

not pretty, but it works