removing slower and no longer used code
completed problem 8