first draft of changes for running BSIM from kernel