made snake a class