base io add windows color and optimize engine codes