loop updated
basic functions updated