Restructure to include conditions