broken and buggy, but the groundwork is there