added and finished models.py
adding helper functions to helpers.py