simplified main.js