Added prime base generation