flow works, need to add tests