updated template
silly daddy
added js option
fixed issue with bad condition