reformat to include react best practices