Changing logic structure