added util function to pick item from array