changed to use junit for unit testing