head command done with test case for default case