added buttons to function events