add unit tests + update analytics tracker