made code formatting changes
added example for issue 37