modified function sequence