move fetchONe and fetchAll to global scope