added NSLog calls for demo