move functions to modules part 2