working, deployable version