Fixed code based on feedback meeting with Spencer Marks