misc ruby codes