changed the return type as it was not needed as a reference (and caused other potential issues)