Added Charlie's solution