add init and api code to driver