Added code: made singleton, changed to target.attributes