Are you working from this tutorial @Andrea_Marchisio?
This should give you some insight into how to approach the problem.