generate bases