added start block; fixed doRepeat