shouldn't this if condition live in the callback to the get call?