add findByFirstname method of repository and clean the code