first version of analysis flow