Added some code changes in method - findByName