Added code: used Stafanov singleton pattern.