added getInstance function to the application