compute attributes