implemented framework for UINT64 optimization

but there is 1 test which doesn't work