put in order some pieces of code