set attrs on init