cleanup code and sample solution