updated some queries