Not currently working. Have to re-structure the code...