remove extra page and routing
add query validation
remove extra function