Added to decoder class and decode function