replaces some depreciated methods