apply margins