Debugging added and example updated