bug with exceptions was fixed; integration with flask started