getUser method is implemented. constructor is changed