reworked the solution and put a more fun version at the top