define class and method