update singleto function