added constructor with increment and return value methods as well as a c...

...hai test
you should probably have semicolons at the end of these if blocks.