jormungandr: refacto of helpers