adjusted formatting and added unit test check