attempting to merge from kepler
add presave function