improved multi_method.js