implemented membn.m, tmemb.m and atmemb.m