Added separation function