added tests
reworked with more examples