Improve skip function