Improve assignment solution

Add meaningful comments and variable names