Moved function def to bottom