changed object to trait