remove usage of deprecated function getInstance