split two protocol functions in class