initial commit
cleaned code
reworked it a bit