edits for compilation after wrapping stages