macro to replace methods in Base