compiles but logic isnt right