method overloading with JS