corrected code analysis