Some better implementation code, slower interval check.