Making getPositionFromInt a global function.