replacing needed code. oops