Some work on SDM profile

verification of bit computations, found a bug in SDMLocation