fixed prime computation, updated unit test