converted to flask templates