handle early return statements more intelligently