data query functionality added to main page