started encryption with loops