wrapped up bot connections into utility function