error checking
updated SQL queries for request visualize
merged msuperd into graphtest