broke up code block into bitesize pieces