How the tap code works