cloning csolve from goto