added depth, added move function, fixed copy function