change ruby block hash table to block value struct for performance