take margin inmto account