Adding condition to treat strings t or f like 1 or 0