Changed plugin function