Adding some common ruby code