added save function to products