eliminated unnecessary block of code for checking number of results