Changed addOptions to accept object instead of array