added save function to some pages