fix signatures and old by references