getInt improved