checked all function and add bet function