added string method to debug
apply debug mode