buttons get updated with code