fixed some logical errors, now for the other models
i should really push more often
enough optimizations for today, still infinitely slow