created generic Task parent with encode and proper pkg based decoding