switch to using metadata to set up instances