added test and made a bugfixes for rollover function