<s>[INST] You have been tasked with creating a function `findPrimes` that takes an integer as an input and returns an array of all prime numbers up to the given integer. A prime number is a number greater than 1 that has no positive divisors other than 1 and itself.[/INST]