generating attribute accessors