move all remaining functions to separate modules