added solution writeup and code