added the condition for test and the get_path