added basic tests, fixes according to them