add tutorial and optimized codes.