make sql a function that accepts one or two params and acts accordingly
include sqlpw if present