Added test and refactoring..... . . . . .
.$#@!@!$!@$$@!!@$$oiehwfoiwehfoiwefhoiwefhiowefoh