This logic looks good to me.