added terms, fixed refresh