fixed prototype overwritting
redefined bmimodel's inheritance