Update template parse method