Singleton function creation by passing excicting functions