add a simple implementation of SMO