attempt at unit testing