added addOptions feature