deprecated fix

Assigning the return value of new