combines funtions into working class function