added background mode to work (but this dies when app closes