Understand the logic and find out syntax errors