fixed some memozations, I think