fix code ordering