Modified to send 1 and 0 for presence to be used in rules