I think a better interface would be to have these as parameters on the to_hash function