abstracts out step 1 and 2 which returns json for the view and the css. step 3 for comparing stays here