better implementation of stop()