better way to figure parameters