created function for multiple addresses