modified function order