alter logic