The casting to integer here is superfluous