properly escape single quotes