changes in implementations and examples

changes in implementations and examples