move unlock code to revealing module pattern