format a bit client, modify adding bid logic and new database query