I'm trying to move my app over to MVC, I have a Parse query which I've moved over to a function in my model class, the function returns a Bool.

When the button in my ViewController below is pressed the model function 'parseQuery' should be run, return a bool and then I need to use that bool to continue. At the moment, the if statement is executed before the function has completed so it always detects false.

How can I ensure that the if statement is completed once the function has completed?

```
@IBAction func showAllExpiredUsers(sender: AnyObject) {

    var success = searchResults.parseQuery()

    if success {
        print("true")
    } else {
        print("false")
    }
    //I have also tried:

    searchResults.parseQuery()

    if searchResults.parseQuery() {
        print("true")
    } else {
        print("false")
    }

```