working without clone, but throwing some exception