refactoring linum format function