changed method parameters, added more tests