added flow.py and corresponding __init__.py
added test for flow.py