How to create new class and making connection