added new tests
added nullchecks, renamed parameters according to interface