updated panda code