more func to front end & setup jade templating on front end