refactoring mybox.sh