useful functionsa