added primitive save feature