Converting the event based interface to Task based ones.