improved recombining, documented + refactored