Added condition for checking that the result isn't empty THAT WORKS