functions updated