add security check