Shouldn't you be assigning that value to newHeight?