implementing tail and namefile
implemented head