open/close life cycle callbacks