partially cut down the amount of sql queries on page load