Function for Start and Stop button implemented