Added new flask implementation