Made further progress but hung up and needs further debugging