fix data
function for template directory