fixed a couple uneccisary code