rewrite card_spec & add root_path_spec