added debug prints for selection