modified the way how it started and stopped