add optional item support

Signed-off-by: wally.1981 <wally.1981@yahoo.com>