tested alot + minor bugfixes