changed some types in toLowLevel