making it turn off at the end