replaced int casts with //-operator