Adition unit test added plus few methods made easy for reuse