first working draft written in react