moved getInt before it is needed