modified and add functions in classes