consolidate code for cobalt into cobalt recipe