updates positions