stuff that needs review
working security version