Added separation algorithm