add lock for loading