adjust function declare order