added support for no data returned 
and refresh when coming back to app