avoid returning a reference to local variable