implement rest functions