newer version, more closely mirrored Ruby API