Added clustering phase