Changed it to have a better way to search for the required response