fixing up stop function - in progress