reformatted code
reformatted and cleaned up code