bugfix: quality parameter was uninitialized
rudimentary method to check temperature has stabilised before stopping