made it into a plugin