pin model and controller