works with older versions of ruby