devin and cj's full solution