fixed some issues, added clone