extract parameter parsing into its own class and split into a couple of separate methods