fixed the needinfo queries and added presentation changes in template based on their existence