toString of logic