fixing switched param and type for a function parameter