added sample for registering a layer