code for the compet.