refactoring to allow passing of single object into new instance and used params for form submission