add method in utils.py