debuged and makde work