added changes to plugin per Jeremy