renamed from save to scala