adding updated splitting density grid script