add codes, bugs here :[