Added save feature, though it doesn't complety work.