add flock method