More logic work