change implementation for old rubies