implemented multiarity fns