implement string class method for debug