Refactored code

refactored step to generate friends into an array in our input
autocomplete dropdown list.