code analysis - first pass