learn methods and function