fixed code snippet, closes #11