add attr_wrapper to define wrapping methods easily