make connection and some constructors