interim commit, very messy but still TS runnable (with persistent error)