update margins