create empty cells script, refactor a little