incorporated savemat() into save()