changing position to array