updated flask example