added missing attributes, fixed errors