added solution to #3