out of debug mode and remove name bug from function