working on bet functionality