Support for custom ids.
use attr_writer
Added test for failing case