It's a mess, but this is the last version