add check and protection