bmiapp client code