let position:CGFloat = CGFloat(UInt(arc4random())) % CGFloat(rangeX) + CGFloat(minX)
replace
       let position:CGFloat = CGFloat(arc4random()) % CGFloat(rangeX) + CGFloat(minX)

because of beta4