Updated tests
working logic