fixed return value mutation issue