webapp using query and minor changes