improve function inputs