some useful helpers