dinamic define singleton method