Added solution to #18