Added solution

Resolves #1.