Replace X with cog