handling upper row and completed reference test