replaced ruby snippets