reformatting helper queries