fighting with tests and incorporated Ismails suggestions