added bet delay loop