added templates for new code, but still needs fixing...