Created utils.py that reuse code