Contains function used by plugin