more reorganization of functions among modules