implemented a semi hacky transition between frames