template and solution