debugged string->complex conversion