As you raced through your locker combination four or five times a day during high school, did you ever stop to wonder how those seemingly random rotations actually worked to protect your lunch and textbooks? The lock’s mysterious inner workings were always hidden away under a metal case, but this clear plastic replica finally reveals what’s going on inside.

The model, made from laser-cut acrylic, reveals three inner wheels that turn along with the numbered dial on the outside. But the wheels only turn in unison when small pins on each one align in a specific pattern, dictated by the lock’s combination and how you turn the dial back and forth. When all three wheels are properly aligned, notches on each one also align, releasing a locking mechanism that allows the lock to pop open. Watching this video of the lock in action should clear up any confusion:

This replica was designed and engineered by Theodore Gray who actually sells copies on his website, MechanicalGifs.com. If you don’t mind assembling the lock yourself, you can get a kit for $45. But if you want all the work done for you, it’s $80 to buy a version that works right out of the box.

[Vimeo via Laughing Squid]