finished magic construct method as well as made data() public