cleaned up template