converting to different sparse implementation...
adding sparse implementation in the test which should probably be removed at some point
changes to sparse implementation