figuring out margins