bug fixed and options added