Implemented encryption. need to test further