now passing unit tests