Adding prime functionality