Made the next position creation and assignment into a single statement.