added prime function