added save validation