big update, almost working