more tests and simplifying the code a bit