woking on some queries