some modification of the great tutorial of jobeet adapted to symfony 2