display array function created (buggy)