optimised usage of unsafeGet and unsafeSet