added support of named function save/load