Commited solution to github.