updated template, sort was causing an error