added channel coding - needs testing/debugging