added User type to clarify function definitions