Perhaps a better way to do this would be to create a function that inserts a single cluster. Then you could call that from the db_setup_cluster, and also wrap it in a loop for the multiple. This pattern should cut down on quite a bit of code duplication.