added custom button functionality