Added unit test and changed method name