Problems 1-4 with reusing code