Added possibility for multiple max locations