improve stick function