I'm getting a syntax error here; I think your trailing `if` is broken.