added spherediag.m