Imported from Kadenz.js