implemented fixture selection and fixed a massive memory leak