deleted unused classes
methods for building matrix in own class