fixed double queries, recovered some test data