copied initial working version of our analyzer from Serena's repo