wubit function implemented