added test code for people to try out