Extended combine method

Added an extra loop and new variable