final solutions for tests