refactored to a singleton instance