removed unnecessary copies