Using struct to create a class