Add controller logic to update both views