added sunnycloud obstacle and flip function