Make the logic