More work towards decoder