added helpers and first run of encryption