refactor to use singlenton