tutorial: smooth code added