update with some fixes