modified test & hoplines for linux & mac