real_example.js better structure, removed obsolete method