first commit

a lot fixes and improvements