updated library so to support more dynamic loading of stored queries