Implemented interface to act as delegate.