adding simpler flask implementation