changed from loop to mutliple arity macro