new save to ANN, fix bugs