brandon_r2: FINAL WORKING CODE