first draft of cluster submission code