moved the getUserId method to make it more visible