added plugin functions