move all default code to a module