moving js out of the template