code updates and first working example