change encryption and add test