deleted check for stop function