first "serious" attempt at writing a function for genrating tags files