Changes to detect shapes to get it to run