An alternative to method overloading