added logic for showing prime numbers