refactored test/simple.js