cleaned up io/template methods