Adding multi-tenant functionality