add the tutorial solution, which is more decent