modified function array method