return results and algo
bug fix
bug fix
moving stuff out of connection contexts
bug fix