updated buttoncontrol and main