Added funcionality to button