Implemented simple clone, working on error handleing