container is better
merged to matthieu's version