modified querys to make less requests