used weak reference for the instance to avoid memory leak