removed some redundant IF statements from str()