modified haarTest