proper duplicate() function
Helper: added a loadData() function