reconstruct the navigator.js as the constructor pattern