add functions into a class