added setter method for attributes