moved from Digest::SHA1 to Digest::SHA and improved the get_randid function by using timestamp with milliseconds