split the model and control from lib