updated to build var/ dir structure