added a very crude progress inidicator, and better null handling