stuart improvements. may need to implement a callback on the engine to get it to sleep properly