working constructor. added variables for jdbc