working on mag hist