added --test option