implemented functional for getting user