CODES -----------------------------------------