basically working, imperfect parameter recording