moved out static methods to utils.py