port nature of code examples to raphael