improved param selection module - compatible with command line matlab