added validatePositions
made changes to test validatePositions