another try at a core templateengine