Adds post detection logic