improved param handling