added some basic class functionality and some test code