swipt add function lock, we must make function do something only one