modified getPersonbyId()