replaced deprecated default_scope in models