functions stop and test added