now works with multiple selection