rewrote the react component -test first style