index and result page working