refactor with #send method and attr_accessor