Adding some lines for button function