borked solution to #1