re-organized template
added jpaql string functions and fixed comment