fix and add codes