added a new method: splitAndStore()