Removed unnecessary additional check involving prime numbers