the method style receives partial function only