added singleton pattern.