use perl instead of sleep 0.2 for protability