refactoring pull flask server out