added srest.tpl and compile function