a few functions updated