Small improvement assignment 6