removes ugly query on view