42 + a few utility functions moved to utils.py