improved outer.margin, working on frame