made changes necessary to compile, from original
got restore to run, but NullPointerException