added ButtonActions struct and getButtonAction function