mostly-working setattr