changed to a non-deprecated stop method
formatting