query fixes, added new methods for web