added asociations

code refactoring for usage with associatins