Added entry query, to query entries before dates array gets built