function exposing unit test