fixed unnecessary old code not needed for plugin