Refactor prime function, no overloaded version needed