Finished outline for LAT code