followed rest of github flask code