fixed shifting and pointer difference