implemented getUserById method