modified flow and database