#259

All these methods should me move later to an Utils class.