Removed dup code

setter accessor abstracted to a new func.