adding max margin background
small max margin changes
merge max_margin formulation