is the (int) cast needed here?