modify to cope with multiple queries
improve tabs look