solved issue with no_method_error