defined tank class and some methods