modified security functions