Capacity logic

finished the lab algorithm for 1hr lab courses