move 'method' definition to resource method