changing models and making the code snippets work better through better functional implementation