added a solution available in ts 0.8