fix zero crossing logic and implement -verbose