Checked code and put in order