The obligation of a contract is not impaired by a law which changes the legal or equitable means for its enforcement, existing at the time it was entered into, provided an adequate even though not so convenient a remedy is retained or substituted therefor. The principle in this respect is thus similar to that discussed in connection with the due process of law clause.3