replace break with return