add generate algorithms