Forked solution for #64