logic tentatively ready to test