removed unnecessary calls to as.character()