Modified to use plugin model