add proper unit tests