Refactor and Prime number