added tests for analyze and get_mode