making results page work