fixed IV initialization and tests created