Added functionallity to buttons