sort out margins