Fixed function for implementing models