all function in model