added security functions to entities