First attempt at plugin, needs testing