Simplified go loop code