(fix) moves helpers inline to access proper scope