added defmethod support