add proper dependencies to spmat, debugging