start of user functions