had some inverted logioc. oops