changed dettach 0 to attach 0