hangout function is moved to util javascript