remove attr_accessor and check for params