Added a reference implementation