some minor changes + added the template