According to Sigmund Freud the ego is: