defined method to find first empty cell, fixed test