add: local functions
Merge pull request #6 from mathiasbourgoin/local_functions

add: local functions