moving the connection create into the base and removing the code duplication