added additional comments and fixed the total_sales method