changed empty_positions method to look a little more Ruby