did some changes and now showing one index when you check the console logs for array