Main Codes