rep layer working. example.cpp producing correct output