proper stop() function.