support empty inputs