added functionality for multiple sites