move solver to discrete library