Continue integration of source from bernd example