set type of right function