Edited loop so it runs

unoccupied() works