working backup... to be changed to u16 version