ADD: separating function in files