fixes + speed impovements