first implementation of the template
still lot of bug to fix