added subsequent presence scanning code