debugging persistance stuff, optimization is pending