Made workflow as a function, since later we may need to use it for test data