tests are added. Implementation changed to satisfy tests :)