a couple of comments in here might be nice explaining the flow