changed from schemas to models
refactored plugins model