auto p in functions