add some comments for clarity
run server before vars