first submission for assignment week 6 \n With no DP optimization. I know this may look ugly, but it is the result after some serious debugging, wanna keep the work