style(): reorganize code according to execution order