implementation of UID