Updated for variable count of arguments support