add protected init method to Task that will be run at the end of construct and unserialize