classified the function