modified the sql queries so they would use the same handle, instead of creating new ones
Changed paths: