Brought in more of the original logic