add small piaces of ruby code