added some button functionality